<div class="row">
    <ol class="breadcrumb">
        <li><a href="#">文章管理</a></li>
        <{if !empty($info)}>
        <li class="active">编辑文章：<{$info.title}></li>
        <{else}>
        <li class="active">发布新文章</li>
        <{/if}>
    </ol>
</div>
<div class="row">
    <form class="form-horizontal" method="POST" action="<{url c='admin/article' a='submit'}>">
        <input type="hidden" name="article_id" value="<{if !empty($info)}><{$info.article_id}><{/if}>">
        <div class="form-group">
            <label for="inputTitle" class="col-sm-2 control-label">文章标题</label>
            <div class="col-sm-6">
                <input type="text" name="title" value="<{if !empty($info)}><{$info.title}><{/if}>" class="form-control" id="inputTitle" placeholder="文章标题">
            </div>
        </div>
        <div class="form-group">
            <label for="selectCategory" class="col-sm-2 control-label">分类</label>
            <div class="col-sm-6">
                <select name="category_id" class="form-control" id="selectCategory">
                    <{foreach $categorys as $cat}>
                    <option value="<{$cat.category_id}>"<{if !empty($info) && $info.category_id == $cat.category_id}> selected<{/if}>><{$cat.category_name}></option>
                    <{/foreach}>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="inputContent" class="col-sm-2 control-label">内容</label>
            <div class="col-sm-6">
                <textarea name="contents" class="form-control xheditor-mini {skin:'nostyle'}" rows="15" id="inputContent" placeholder="文章内容"><{if !empty($info)}><{$info.contents nofilter}><{/if}></textarea>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-8">
                <button type="submit" class="btn btn-default">提交</button>
            </div>
        </div>
    </form>
</div>